package com.chenwei.design.proxy.jdkProxy;

/**
 * @author: chenwei
 * @date: 2021/3/28 17:20
 */
public class Client {
    public static void main(String[] args) {
        //1.创建目标对象
        JdkTargetObject target = new JdkTargetObject();
        //2.实例代理对象
        JdkProxyInterface proxyInstance = (JdkProxyInterface) new JDKProxyFactory(target).getProxyInstance();
        proxyInstance.work();
        System.out.println("-------");
        proxyInstance.say("代理说话");


    }
}
